package com.wxm.china.port.dds.exception;

import lombok.Data;

/**
 * <p>
 *      数据加签异常
 * </p>
 *
 * @author: wxm
 * @Date: 2023/6/30
 */
@Data
public class DDSException extends RuntimeException {
    /**
     * 错误码
     */
    private final Integer code;

    /**
     * 错误说明
     */
    private final String msg;

    protected DDSException(Integer code,String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public static void error(String msg){
        throw new DDSException(500,msg);
    }
}
